<template>
	<div>		
		<h1>{{title}}</h1>
		<article>{{articleData}}</article>
	</div>
</template>

<script>
	import api from "./../axios/api.js"
	export default{
		name:"Articles",
		data(){
			return {
				title:"",
				articleData:""			
			}
		},
		created(){
			this.getArticleDetail();
		},
		methods:{
			getArticleDetail:function () {
				api.JH_news('/article','type=top&key=123456')
				.then(res=>{
					console.log(res);
					this.title = res.title;
					this.articleData = res.articles;
				})
			}
		}

	}
</script>